package com.koron.system.staff.controller;

import com.koron.system.staff.service.BimUnifyUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author jzp
 * @since 2023/6/29
 */
@Slf4j
@Api(tags = "竹云平台用户及组织")
@RestController
@RequestMapping("/system/bimUnifyUser")
public class BimUnifyUserController {

    @Autowired
    BimUnifyUserService bimUnifyUserService;

    @ApiOperation(value = "同步用户组织结构")
    @PostMapping("/SchemaService")
    public String schemaService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.schemaService(req);
    }

    @ApiOperation(value = "同步组织创建")
    @PostMapping("/OrgCreateService")
    public String orgCreateService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.orgCreateService(req);
    }

    @ApiOperation(value = "同步组织更新")
    @PostMapping("/OrgUpdateService")
    public String orgUpdateService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.orgCreateService(req);
    }

    @ApiOperation(value = "同步组织删除")
    @PostMapping("/OrgDeleteService")
    public String orgDeleteService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.orgDeleteService(req);
    }

    @ApiOperation(value = "同步用户创建")
    @PostMapping("/UserCreateService")
    public String userCreateService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.userCreateService(req);
    }

    @ApiOperation(value = "同步用户更新")
    @PostMapping("/UserUpdateService")
    public String userUpdateService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.userCreateService(req);
    }

    @ApiOperation(value = "同步用户删除")
    @PostMapping("/UserDeleteService")
    public String userDeleteService(HttpServletRequest req, HttpServletResponse resp) {
        return bimUnifyUserService.userDeleteService(req);
    }

}
